package com.ricchieri.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Inheritance(strategy=InheritanceType.JOINED)
@Table(name="detailTrip")
public class DetailTrip extends BaseEntity {
	private static final long serialVersionUID = 7672047258241998169L;
	
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "trip", nullable = false)
	private Trip trip;
	
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tripStop", nullable = false)
	private TripStop tripStop;
	
	public Trip getTrip() {
		return trip;
	}
	public void setTrip(Trip trip) {
		this.trip = trip;
	}
	public TripStop getTripStop() {
		return tripStop;
	}
	public void setTripStop(TripStop tripStop) {
		this.tripStop = tripStop;
	}	
	
}